class FeedbacksController < ApplicationController
  active_scaffold :feedback do |config|
    config.theme = :blue
    
    config.label = "FeedBack"
    config.columns = [:title, :description, :resolvido, :created_at]
    config.columns.add :foi_impresso
    
    config.create.columns = [:title, :description, :resolvido]
    
    config.list.columns = [:title, :description, :foi_resolvido]
    config.list.sorting = [{:resolvido => :asc}, {:created_at => :asc}]
    
    config.update.columns = [:title, :description, :resolvido]
    
    config.columns[:description].label = "Descrição:"
    config.columns[:title].label = "Título:"
    
    config.create.link.label = "NOVO"
    config.search.link.label = "BUSCA"
    config.show.link.label = "Detalhes"
    config.delete.link.label = "Apagar"
    config.delete.link.confirm = "Apagar?"
    
    config.actions.exclude :search

  end
  
  def print
    @f = Feedback.find(:all, :conditions => ['resolvido = ?',false])
    respond_to do |format|
      format.html { render :partial => 'print', :laytou => false}
    end
  end
end
